<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品列表">
</@frame.head>
<link rel="stylesheet" href="${contextPath}/resources/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
<div class="page-container">
	<form action="${contextPath}/role/role_update" method="post" class="form form-horizontal" id="form-role">
	<input type="hidden"  name="roleId" id="roleId" value="${(role.id?c)!}"/>
	<input type="hidden"  name="ids" id="ids" />
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">
				<span class="c-red">*</span>
				角色名称：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="text" class="input-text"  placeholder="" id="name" name="name" value="${role.name}">
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">
			<span class="c-red">*</span>
				角色编号：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="text" class="input-text"  placeholder="" id="number" name="number" value="${role.number}" onblur="checkNo(this.value)";>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">
			<span class="c-red">*</span>
				角色备注：</label>
			<div class="formControls col-xs-6 col-sm-6">
				<input type="text" class="input-text"  placeholder="" id="remark" name="remark" value="${role.remark}">
			</div>
		</div>
		<div class="row cl">
			<div class="col-9 col-offset-2">
				<input class="btn btn-primary radius" type="button" onclick="update();"  value="&nbsp;&nbsp;保存&nbsp;&nbsp;">
			</div>
		</div>
		<table class="table">
			<tr>
				<td width="200" class="va-t"><ul id="treeDemo" class="ztree"></ul></td>
			</tr>
		</table>
	</form>
</div>
<@frame.end "default">
</@frame.end>
<script type="text/javascript" src="${contextPath}/resources/lib/zTree/v3/js/jquery.ztree.core-3.5.min.js"></script>
<script type="text/javascript" src="${contextPath}/resources/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script> 
<script type="text/javascript" src="${contextPath}/resources/js/system/role.js"></script> 
<script type="text/javascript">
var path="${contextPath}";
var setting = {
		check: {
			enable: true
		},
		data: {
			simpleData: {
				enable:true,
				idKey: "id",
				pIdKey: "pId",
				rootPId: ""
			}
		}
	};
$(document).ready(function(){
	var ztreelist='${ztreelist}';
	var t = $("#treeDemo");
	t = $.fn.zTree.init(t, setting, JSON.parse(ztreelist));
	demoIframe = $("#testIframe");
});
</script>
</body>
</html>